package com.fc.authentication.core.migrate.model;

/**
 * Stores all the parameters needed for a database connection.
 * 
 * @author noname
 * 
 */
public class ConnectionParameters {

	private String _uri;
	private String _user;
	private String _driver;
	private String _password;
	private boolean _getFromPool = false;

	public ConnectionParameters(String uri, String driver, String user,
                                String password) {
		_uri = uri;
		_user = user;
		_driver = driver;
		_password = password;
		_getFromPool = false;
	}
	
	public ConnectionParameters() {
		_getFromPool = false;
	}

	public ConnectionParameters(boolean getFromPool) {
		_getFromPool = true;
	}

	public String getUrl() {
		return _uri;
	}

	public String getUser() {
		return _user;
	}

	public String getDriver() {
		return _driver;
	}

	public String getPassword() {
		return _password;
	}

	void setUrl(String uri) {
		_uri = uri;
	}

	void setUser(String user) {
		_user = user;
	}

	void setDriver(String driver) {
		_driver = driver;
	}

	void setPassword(String password) {
		_password = password;
	}

	public boolean getFromPool() {
		return _getFromPool;
	}

}
